<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<meta name="generator" content="Doxygen 1.8.10"/>
<title>sock: E:/git/sock/sock/net/reactor.h Source File</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/searchdata.js"></script>
<script type="text/javascript" src="search/search.js"></script>
<script type="text/javascript">
  $(document).ready(function() { init_search(); });
</script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  <td id="projectalign" style="padding-left: 0.5em;">
   <div id="projectname">sock
   &#160;<span id="projectnumber">v0.11</span>
   </div>
   <div id="projectbrief">C++ Network Library</div>
  </td>
 </tr>
 </tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.8.10 -->
<script type="text/javascript">
var searchBox = new SearchBox("searchBox", "search",false,'Search');
</script>
  <div id="navrow1" class="tabs">
    <ul class="tablist">
      <li><a href="index.html"><span>Main&#160;Page</span></a></li>
      <li><a href="pages.html"><span>Related&#160;Pages</span></a></li>
      <li><a href="namespaces.html"><span>Namespaces</span></a></li>
      <li><a href="annotated.html"><span>Classes</span></a></li>
      <li class="current"><a href="files.html"><span>Files</span></a></li>
      <li>
        <div id="MSearchBox" class="MSearchBoxInactive">
        <span class="left">
          <img id="MSearchSelect" src="search/mag_sel.png"
               onmouseover="return searchBox.OnSearchSelectShow()"
               onmouseout="return searchBox.OnSearchSelectHide()"
               alt=""/>
          <input type="text" id="MSearchField" value="Search" accesskey="S"
               onfocus="searchBox.OnSearchFieldFocus(true)" 
               onblur="searchBox.OnSearchFieldFocus(false)" 
               onkeyup="searchBox.OnSearchFieldChange(event)"/>
          </span><span class="right">
            <a id="MSearchClose" href="javascript:searchBox.CloseResultsWindow()"><img id="MSearchCloseImg" border="0" src="search/close.png" alt=""/></a>
          </span>
        </div>
      </li>
    </ul>
  </div>
  <div id="navrow2" class="tabs2">
    <ul class="tablist">
      <li><a href="files.html"><span>File&#160;List</span></a></li>
      <li><a href="globals.html"><span>File&#160;Members</span></a></li>
    </ul>
  </div>
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
     onmouseover="return searchBox.OnSearchSelectShow()"
     onmouseout="return searchBox.OnSearchSelectHide()"
     onkeydown="return searchBox.OnSearchSelectKey(event)">
</div>

<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="javascript:void(0)" frameborder="0" 
        name="MSearchResults" id="MSearchResults">
</iframe>
</div>

<div id="nav-path" class="navpath">
  <ul>
<li class="navelem"><a class="el" href="dir_885cc87fac2d91e269af0a5a959fa5f6.html">E:</a></li><li class="navelem"><a class="el" href="dir_4e091ed8704426a7a4980368ba259fde.html">git</a></li><li class="navelem"><a class="el" href="dir_99ede9081e3122cb31ab1bd7b142cd6c.html">sock</a></li><li class="navelem"><a class="el" href="dir_7c33e989e8c050d7b2ba91a16c41033d.html">sock</a></li><li class="navelem"><a class="el" href="dir_d903d5916af6fe48bd2085e947d1c878.html">net</a></li>  </ul>
</div>
</div><!-- top -->
<div class="header">
  <div class="headertitle">
<div class="title">reactor.h</div>  </div>
</div><!--header-->
<div class="contents">
<a href="reactor_8h.html">Go to the documentation of this file.</a><div class="fragment"><div class="line"><a name="l00001"></a><span class="lineno">    1</span>&#160;<span class="comment">/******************************************************************************</span></div>
<div class="line"><a name="l00002"></a><span class="lineno">    2</span>&#160;<span class="comment"> * Name         : reactor.h</span></div>
<div class="line"><a name="l00003"></a><span class="lineno">    3</span>&#160;<span class="comment"> * Author       : 671643387</span></div>
<div class="line"><a name="l00004"></a><span class="lineno">    4</span>&#160;<span class="comment"> * Date         : 2015年10月6日</span></div>
<div class="line"><a name="l00005"></a><span class="lineno">    5</span>&#160;<span class="comment"> * Description  :</span></div>
<div class="line"><a name="l00006"></a><span class="lineno">    6</span>&#160;<span class="comment"> *****************************************************************************/</span></div>
<div class="line"><a name="l00007"></a><span class="lineno">    7</span>&#160;</div>
<div class="line"><a name="l00008"></a><span class="lineno">    8</span>&#160;<span class="preprocessor">#ifndef SOCK_NET_REACTOR_H_</span></div>
<div class="line"><a name="l00009"></a><span class="lineno">    9</span>&#160;<span class="preprocessor">#define SOCK_NET_REACTOR_H_</span></div>
<div class="line"><a name="l00010"></a><span class="lineno">   10</span>&#160;</div>
<div class="line"><a name="l00011"></a><span class="lineno">   11</span>&#160;<span class="preprocessor">#include &lt;boost/noncopyable.hpp&gt;</span></div>
<div class="line"><a name="l00012"></a><span class="lineno">   12</span>&#160;<span class="preprocessor">#include &lt;boost/shared_ptr.hpp&gt;</span></div>
<div class="line"><a name="l00013"></a><span class="lineno">   13</span>&#160;<span class="preprocessor">#include &lt;<a class="code" href="time_8h.html">sock/base/time.h</a>&gt;</span></div>
<div class="line"><a name="l00014"></a><span class="lineno">   14</span>&#160;<span class="preprocessor">#include &lt;<a class="code" href="net__event__handler_8h.html">sock/net/net_event_handler.h</a>&gt;</span></div>
<div class="line"><a name="l00015"></a><span class="lineno">   15</span>&#160;<span class="preprocessor">#include &lt;<a class="code" href="socket_8h.html">sock/net/socket.h</a>&gt;</span></div>
<div class="line"><a name="l00016"></a><span class="lineno">   16</span>&#160;</div>
<div class="line"><a name="l00017"></a><span class="lineno">   17</span>&#160;<span class="keyword">namespace </span><a class="code" href="namespacesock.html">sock</a></div>
<div class="line"><a name="l00018"></a><span class="lineno">   18</span>&#160;{</div>
<div class="line"><a name="l00019"></a><span class="lineno">   19</span>&#160;    <span class="keyword">namespace </span>net</div>
<div class="line"><a name="l00020"></a><span class="lineno">   20</span>&#160;    {</div>
<div class="line"><a name="l00024"></a><span class="lineno"><a class="line" href="classsock_1_1net_1_1_reactor.html">   24</a></span>&#160;        <span class="keyword">class </span><a class="code" href="classsock_1_1net_1_1_reactor.html">Reactor</a> : <span class="keyword">public</span> boost::noncopyable</div>
<div class="line"><a name="l00025"></a><span class="lineno">   25</span>&#160;        {</div>
<div class="line"><a name="l00026"></a><span class="lineno">   26</span>&#160;        <span class="keyword">public</span>:</div>
<div class="line"><a name="l00030"></a><span class="lineno"><a class="line" href="classsock_1_1net_1_1_reactor.html#a47804de81fecd9e153a0893926279197">   30</a></span>&#160;            <span class="keyword">enum</span> <a class="code" href="classsock_1_1net_1_1_reactor.html#a47804de81fecd9e153a0893926279197">Event</a></div>
<div class="line"><a name="l00031"></a><span class="lineno">   31</span>&#160;            {</div>
<div class="line"><a name="l00032"></a><span class="lineno"><a class="line" href="classsock_1_1net_1_1_reactor.html#a47804de81fecd9e153a0893926279197a882c20771f64fd23b689438320c1b197">   32</a></span>&#160;                <a class="code" href="classsock_1_1net_1_1_reactor.html#a47804de81fecd9e153a0893926279197a882c20771f64fd23b689438320c1b197">READ</a> = 0x1,                 <span class="comment">/* 读 */</span></div>
<div class="line"><a name="l00033"></a><span class="lineno"><a class="line" href="classsock_1_1net_1_1_reactor.html#a47804de81fecd9e153a0893926279197a98270db6d3ea12747653b0627a514086">   33</a></span>&#160;                <a class="code" href="classsock_1_1net_1_1_reactor.html#a47804de81fecd9e153a0893926279197a98270db6d3ea12747653b0627a514086">WRITE</a> = 0x2,                <span class="comment">/* 写 */</span></div>
<div class="line"><a name="l00034"></a><span class="lineno"><a class="line" href="classsock_1_1net_1_1_reactor.html#a47804de81fecd9e153a0893926279197aa9284f403794613a8347b16c4b806cdd">   34</a></span>&#160;                <a class="code" href="classsock_1_1net_1_1_reactor.html#a47804de81fecd9e153a0893926279197aa9284f403794613a8347b16c4b806cdd">ERR</a> = 0x4,                  <span class="comment">/* 错误 */</span></div>
<div class="line"><a name="l00035"></a><span class="lineno"><a class="line" href="classsock_1_1net_1_1_reactor.html#a47804de81fecd9e153a0893926279197a3cf7edae26c7f7b9af0b0f8d9cbc7969">   35</a></span>&#160;                <a class="code" href="classsock_1_1net_1_1_reactor.html#a47804de81fecd9e153a0893926279197a3cf7edae26c7f7b9af0b0f8d9cbc7969">RDERR</a> = <a class="code" href="classsock_1_1net_1_1_reactor.html#a47804de81fecd9e153a0893926279197a882c20771f64fd23b689438320c1b197">READ</a> | <a class="code" href="classsock_1_1net_1_1_reactor.html#a47804de81fecd9e153a0893926279197aa9284f403794613a8347b16c4b806cdd">ERR</a>,         <span class="comment">/* 读/错误 */</span></div>
<div class="line"><a name="l00036"></a><span class="lineno"><a class="line" href="classsock_1_1net_1_1_reactor.html#a47804de81fecd9e153a0893926279197a0e7f9665c5206ccea8e8905e0a603c6a">   36</a></span>&#160;                <a class="code" href="classsock_1_1net_1_1_reactor.html#a47804de81fecd9e153a0893926279197a0e7f9665c5206ccea8e8905e0a603c6a">WRERR</a> = <a class="code" href="classsock_1_1net_1_1_reactor.html#a47804de81fecd9e153a0893926279197a98270db6d3ea12747653b0627a514086">WRITE</a> | <a class="code" href="classsock_1_1net_1_1_reactor.html#a47804de81fecd9e153a0893926279197aa9284f403794613a8347b16c4b806cdd">ERR</a>,        <span class="comment">/* 写/错误 */</span></div>
<div class="line"><a name="l00037"></a><span class="lineno"><a class="line" href="classsock_1_1net_1_1_reactor.html#a47804de81fecd9e153a0893926279197ac8f0208397c73d7e4e9a353a12e03cae">   37</a></span>&#160;                <a class="code" href="classsock_1_1net_1_1_reactor.html#a47804de81fecd9e153a0893926279197ac8f0208397c73d7e4e9a353a12e03cae">RDWR</a> = <a class="code" href="classsock_1_1net_1_1_reactor.html#a47804de81fecd9e153a0893926279197a882c20771f64fd23b689438320c1b197">READ</a> | <a class="code" href="classsock_1_1net_1_1_reactor.html#a47804de81fecd9e153a0893926279197a98270db6d3ea12747653b0627a514086">WRITE</a>,        <span class="comment">/* 读/写 */</span></div>
<div class="line"><a name="l00038"></a><span class="lineno"><a class="line" href="classsock_1_1net_1_1_reactor.html#a47804de81fecd9e153a0893926279197abb336e4beecd5cb2896e832cecd00ca4">   38</a></span>&#160;                <a class="code" href="classsock_1_1net_1_1_reactor.html#a47804de81fecd9e153a0893926279197abb336e4beecd5cb2896e832cecd00ca4">ALL</a> = <a class="code" href="classsock_1_1net_1_1_reactor.html#a47804de81fecd9e153a0893926279197a882c20771f64fd23b689438320c1b197">READ</a> | <a class="code" href="classsock_1_1net_1_1_reactor.html#a47804de81fecd9e153a0893926279197a98270db6d3ea12747653b0627a514086">WRITE</a> | <a class="code" href="classsock_1_1net_1_1_reactor.html#a47804de81fecd9e153a0893926279197aa9284f403794613a8347b16c4b806cdd">ERR</a>    <span class="comment">/* 读/写/错误 */</span></div>
<div class="line"><a name="l00039"></a><span class="lineno">   39</span>&#160;            };</div>
<div class="line"><a name="l00040"></a><span class="lineno">   40</span>&#160;        <span class="keyword">public</span>:</div>
<div class="line"><a name="l00041"></a><span class="lineno"><a class="line" href="classsock_1_1net_1_1_reactor.html#a3f7030a8a6230487c674853224ddb915">   41</a></span>&#160;            <a class="code" href="classsock_1_1net_1_1_reactor.html#a3f7030a8a6230487c674853224ddb915">Reactor</a>(<span class="keywordtype">void</span>) : <a class="code" href="classsock_1_1net_1_1_reactor.html#ac3d9bb4b0f4988c7c174b2febd239b9a">heartbeatTime_</a>(1000 * 60) {}</div>
<div class="line"><a name="l00042"></a><span class="lineno"><a class="line" href="classsock_1_1net_1_1_reactor.html#ad616dbb0d11d2d651b5fd244e0e6c609">   42</a></span>&#160;            <span class="keyword">virtual</span> <a class="code" href="classsock_1_1net_1_1_reactor.html#ad616dbb0d11d2d651b5fd244e0e6c609">~Reactor</a>(<span class="keywordtype">void</span>){}</div>
<div class="line"><a name="l00043"></a><span class="lineno">   43</span>&#160;</div>
<div class="line"><a name="l00044"></a><span class="lineno">   44</span>&#160;        <span class="keyword">public</span>:</div>
<div class="line"><a name="l00052"></a><span class="lineno">   52</span>&#160;            <span class="keyword">virtual</span> <span class="keywordtype">bool</span> <a class="code" href="classsock_1_1net_1_1_reactor.html#a31ff586f2329ba43e73ea5762b4929e7">addSource</a>(sock_t <a class="code" href="namespacesock.html">sock</a>, <a class="code" href="classsock_1_1net_1_1_reactor.html#a47804de81fecd9e153a0893926279197">Event</a> event, <a class="code" href="classsock_1_1net_1_1_net_event_handler.html">NetEventHandler</a>* handler) = 0;</div>
<div class="line"><a name="l00053"></a><span class="lineno">   53</span>&#160;</div>
<div class="line"><a name="l00058"></a><span class="lineno">   58</span>&#160;            <span class="keyword">virtual</span> <span class="keywordtype">void</span> <a class="code" href="classsock_1_1net_1_1_reactor.html#acd768d76883d1217bb4cf10a3820990e">removeSource</a>(sock_t <a class="code" href="namespacesock.html">sock</a>) = 0;</div>
<div class="line"><a name="l00059"></a><span class="lineno">   59</span>&#160;</div>
<div class="line"><a name="l00067"></a><span class="lineno">   67</span>&#160;            <span class="keyword">virtual</span> <span class="keywordtype">bool</span> <a class="code" href="classsock_1_1net_1_1_reactor.html#a31ff586f2329ba43e73ea5762b4929e7">addSource</a>(<a class="code" href="classsock_1_1net_1_1_socket.html">Socket</a>* <a class="code" href="namespacesock.html">sock</a>, <a class="code" href="classsock_1_1net_1_1_reactor.html#a47804de81fecd9e153a0893926279197">Event</a> event, <a class="code" href="classsock_1_1net_1_1_net_event_handler.html">NetEventHandler</a>* handler) = 0;</div>
<div class="line"><a name="l00068"></a><span class="lineno">   68</span>&#160;</div>
<div class="line"><a name="l00073"></a><span class="lineno">   73</span>&#160;            <span class="keyword">virtual</span> <span class="keywordtype">void</span> <a class="code" href="classsock_1_1net_1_1_reactor.html#acd768d76883d1217bb4cf10a3820990e">removeSource</a>(<a class="code" href="classsock_1_1net_1_1_socket.html">Socket</a>* <a class="code" href="namespacesock.html">sock</a>) = 0;</div>
<div class="line"><a name="l00074"></a><span class="lineno">   74</span>&#160;</div>
<div class="line"><a name="l00079"></a><span class="lineno">   79</span>&#160;            <span class="keyword">virtual</span> <span class="keywordtype">void</span> <a class="code" href="classsock_1_1net_1_1_reactor.html#a479c30f659596b68d0ad820981227ebf">tick</a>(<span class="keywordtype">int</span> timeout = 0) = 0;</div>
<div class="line"><a name="l00080"></a><span class="lineno">   80</span>&#160;</div>
<div class="line"><a name="l00081"></a><span class="lineno">   81</span>&#160;        <span class="keyword">public</span>:</div>
<div class="line"><a name="l00086"></a><span class="lineno"><a class="line" href="classsock_1_1net_1_1_reactor.html#ac117f6b319f740f26bae2036f2b754d6">   86</a></span>&#160;            <span class="keywordtype">void</span> <a class="code" href="classsock_1_1net_1_1_reactor.html#ac117f6b319f740f26bae2036f2b754d6">setHeartbeatTime</a>(base::mtime_t time) { <a class="code" href="classsock_1_1net_1_1_reactor.html#ac3d9bb4b0f4988c7c174b2febd239b9a">heartbeatTime_</a> = time; }</div>
<div class="line"><a name="l00087"></a><span class="lineno">   87</span>&#160;</div>
<div class="line"><a name="l00092"></a><span class="lineno"><a class="line" href="classsock_1_1net_1_1_reactor.html#aca3e0bd8eaf38b10118755a5b22fb4c2">   92</a></span>&#160;            base::mtime_t <a class="code" href="classsock_1_1net_1_1_reactor.html#aca3e0bd8eaf38b10118755a5b22fb4c2">getHeartbeatTime</a>(<span class="keywordtype">void</span>)<span class="keyword"> const </span>{ <span class="keywordflow">return</span> <a class="code" href="classsock_1_1net_1_1_reactor.html#ac3d9bb4b0f4988c7c174b2febd239b9a">heartbeatTime_</a>; }</div>
<div class="line"><a name="l00093"></a><span class="lineno">   93</span>&#160;</div>
<div class="line"><a name="l00094"></a><span class="lineno">   94</span>&#160;        <span class="keyword">protected</span>:</div>
<div class="line"><a name="l00095"></a><span class="lineno"><a class="line" href="classsock_1_1net_1_1_reactor.html#ac3d9bb4b0f4988c7c174b2febd239b9a">   95</a></span>&#160;            base::mtime_t <a class="code" href="classsock_1_1net_1_1_reactor.html#ac3d9bb4b0f4988c7c174b2febd239b9a">heartbeatTime_</a>;       <span class="comment">/* 心跳间隔，默认1分钟 */</span></div>
<div class="line"><a name="l00096"></a><span class="lineno">   96</span>&#160;        };</div>
<div class="line"><a name="l00097"></a><span class="lineno">   97</span>&#160;</div>
<div class="line"><a name="l00098"></a><span class="lineno"><a class="line" href="namespacesock_1_1net.html#af8e0f3d2c4f0c2125945c1db54739b23">   98</a></span>&#160;        <span class="keyword">typedef</span> boost::shared_ptr&lt;Reactor&gt; <a class="code" href="namespacesock_1_1net.html#af8e0f3d2c4f0c2125945c1db54739b23">ReactorPtr</a>;</div>
<div class="line"><a name="l00099"></a><span class="lineno">   99</span>&#160;    }</div>
<div class="line"><a name="l00100"></a><span class="lineno">  100</span>&#160;}</div>
<div class="line"><a name="l00101"></a><span class="lineno">  101</span>&#160;</div>
<div class="line"><a name="l00102"></a><span class="lineno">  102</span>&#160;<span class="preprocessor">#endif </span><span class="comment">/* SOCK_NET_REACTOR_H_ */</span><span class="preprocessor"></span></div>
<div class="ttc" id="classsock_1_1net_1_1_reactor_html_ac3d9bb4b0f4988c7c174b2febd239b9a"><div class="ttname"><a href="classsock_1_1net_1_1_reactor.html#ac3d9bb4b0f4988c7c174b2febd239b9a">sock::net::Reactor::heartbeatTime_</a></div><div class="ttdeci">base::mtime_t heartbeatTime_</div><div class="ttdef"><b>Definition:</b> reactor.h:95</div></div>
<div class="ttc" id="classsock_1_1net_1_1_reactor_html_aca3e0bd8eaf38b10118755a5b22fb4c2"><div class="ttname"><a href="classsock_1_1net_1_1_reactor.html#aca3e0bd8eaf38b10118755a5b22fb4c2">sock::net::Reactor::getHeartbeatTime</a></div><div class="ttdeci">base::mtime_t getHeartbeatTime(void) const </div><div class="ttdoc">获取心跳间隔时间 </div><div class="ttdef"><b>Definition:</b> reactor.h:92</div></div>
<div class="ttc" id="classsock_1_1net_1_1_net_event_handler_html"><div class="ttname"><a href="classsock_1_1net_1_1_net_event_handler.html">sock::net::NetEventHandler</a></div><div class="ttdoc">网络事件处理器 </div><div class="ttdef"><b>Definition:</b> net_event_handler.h:20</div></div>
<div class="ttc" id="classsock_1_1net_1_1_reactor_html_a47804de81fecd9e153a0893926279197aa9284f403794613a8347b16c4b806cdd"><div class="ttname"><a href="classsock_1_1net_1_1_reactor.html#a47804de81fecd9e153a0893926279197aa9284f403794613a8347b16c4b806cdd">sock::net::Reactor::ERR</a></div><div class="ttdef"><b>Definition:</b> reactor.h:34</div></div>
<div class="ttc" id="classsock_1_1net_1_1_reactor_html_a47804de81fecd9e153a0893926279197abb336e4beecd5cb2896e832cecd00ca4"><div class="ttname"><a href="classsock_1_1net_1_1_reactor.html#a47804de81fecd9e153a0893926279197abb336e4beecd5cb2896e832cecd00ca4">sock::net::Reactor::ALL</a></div><div class="ttdef"><b>Definition:</b> reactor.h:38</div></div>
<div class="ttc" id="time_8h_html"><div class="ttname"><a href="time_8h.html">time.h</a></div></div>
<div class="ttc" id="classsock_1_1net_1_1_reactor_html_ac117f6b319f740f26bae2036f2b754d6"><div class="ttname"><a href="classsock_1_1net_1_1_reactor.html#ac117f6b319f740f26bae2036f2b754d6">sock::net::Reactor::setHeartbeatTime</a></div><div class="ttdeci">void setHeartbeatTime(base::mtime_t time)</div><div class="ttdoc">设置心跳间隔时间 </div><div class="ttdef"><b>Definition:</b> reactor.h:86</div></div>
<div class="ttc" id="classsock_1_1net_1_1_reactor_html_a47804de81fecd9e153a0893926279197a882c20771f64fd23b689438320c1b197"><div class="ttname"><a href="classsock_1_1net_1_1_reactor.html#a47804de81fecd9e153a0893926279197a882c20771f64fd23b689438320c1b197">sock::net::Reactor::READ</a></div><div class="ttdef"><b>Definition:</b> reactor.h:32</div></div>
<div class="ttc" id="classsock_1_1net_1_1_reactor_html_a47804de81fecd9e153a0893926279197ac8f0208397c73d7e4e9a353a12e03cae"><div class="ttname"><a href="classsock_1_1net_1_1_reactor.html#a47804de81fecd9e153a0893926279197ac8f0208397c73d7e4e9a353a12e03cae">sock::net::Reactor::RDWR</a></div><div class="ttdef"><b>Definition:</b> reactor.h:37</div></div>
<div class="ttc" id="classsock_1_1net_1_1_reactor_html_a479c30f659596b68d0ad820981227ebf"><div class="ttname"><a href="classsock_1_1net_1_1_reactor.html#a479c30f659596b68d0ad820981227ebf">sock::net::Reactor::tick</a></div><div class="ttdeci">virtual void tick(int timeout=0)=0</div><div class="ttdoc">Tick处理网络事件 </div></div>
<div class="ttc" id="classsock_1_1net_1_1_reactor_html"><div class="ttname"><a href="classsock_1_1net_1_1_reactor.html">sock::net::Reactor</a></div><div class="ttdoc">网络反应器 </div><div class="ttdef"><b>Definition:</b> reactor.h:24</div></div>
<div class="ttc" id="classsock_1_1net_1_1_reactor_html_a47804de81fecd9e153a0893926279197a3cf7edae26c7f7b9af0b0f8d9cbc7969"><div class="ttname"><a href="classsock_1_1net_1_1_reactor.html#a47804de81fecd9e153a0893926279197a3cf7edae26c7f7b9af0b0f8d9cbc7969">sock::net::Reactor::RDERR</a></div><div class="ttdef"><b>Definition:</b> reactor.h:35</div></div>
<div class="ttc" id="classsock_1_1net_1_1_reactor_html_acd768d76883d1217bb4cf10a3820990e"><div class="ttname"><a href="classsock_1_1net_1_1_reactor.html#acd768d76883d1217bb4cf10a3820990e">sock::net::Reactor::removeSource</a></div><div class="ttdeci">virtual void removeSource(sock_t sock)=0</div><div class="ttdoc">移除事件源 </div></div>
<div class="ttc" id="classsock_1_1net_1_1_reactor_html_a47804de81fecd9e153a0893926279197"><div class="ttname"><a href="classsock_1_1net_1_1_reactor.html#a47804de81fecd9e153a0893926279197">sock::net::Reactor::Event</a></div><div class="ttdeci">Event</div><div class="ttdoc">网络事件类型 </div><div class="ttdef"><b>Definition:</b> reactor.h:30</div></div>
<div class="ttc" id="classsock_1_1net_1_1_reactor_html_a3f7030a8a6230487c674853224ddb915"><div class="ttname"><a href="classsock_1_1net_1_1_reactor.html#a3f7030a8a6230487c674853224ddb915">sock::net::Reactor::Reactor</a></div><div class="ttdeci">Reactor(void)</div><div class="ttdef"><b>Definition:</b> reactor.h:41</div></div>
<div class="ttc" id="namespacesock_html"><div class="ttname"><a href="namespacesock.html">sock</a></div><div class="ttdef"><b>Definition:</b> atomic.h:17</div></div>
<div class="ttc" id="classsock_1_1net_1_1_reactor_html_a31ff586f2329ba43e73ea5762b4929e7"><div class="ttname"><a href="classsock_1_1net_1_1_reactor.html#a31ff586f2329ba43e73ea5762b4929e7">sock::net::Reactor::addSource</a></div><div class="ttdeci">virtual bool addSource(sock_t sock, Event event, NetEventHandler *handler)=0</div><div class="ttdoc">添加事件源 </div></div>
<div class="ttc" id="namespacesock_1_1net_html_af8e0f3d2c4f0c2125945c1db54739b23"><div class="ttname"><a href="namespacesock_1_1net.html#af8e0f3d2c4f0c2125945c1db54739b23">sock::net::ReactorPtr</a></div><div class="ttdeci">boost::shared_ptr&lt; Reactor &gt; ReactorPtr</div><div class="ttdef"><b>Definition:</b> reactor.h:98</div></div>
<div class="ttc" id="classsock_1_1net_1_1_reactor_html_a47804de81fecd9e153a0893926279197a0e7f9665c5206ccea8e8905e0a603c6a"><div class="ttname"><a href="classsock_1_1net_1_1_reactor.html#a47804de81fecd9e153a0893926279197a0e7f9665c5206ccea8e8905e0a603c6a">sock::net::Reactor::WRERR</a></div><div class="ttdef"><b>Definition:</b> reactor.h:36</div></div>
<div class="ttc" id="classsock_1_1net_1_1_reactor_html_a47804de81fecd9e153a0893926279197a98270db6d3ea12747653b0627a514086"><div class="ttname"><a href="classsock_1_1net_1_1_reactor.html#a47804de81fecd9e153a0893926279197a98270db6d3ea12747653b0627a514086">sock::net::Reactor::WRITE</a></div><div class="ttdef"><b>Definition:</b> reactor.h:33</div></div>
<div class="ttc" id="net__event__handler_8h_html"><div class="ttname"><a href="net__event__handler_8h.html">net_event_handler.h</a></div></div>
<div class="ttc" id="classsock_1_1net_1_1_socket_html"><div class="ttname"><a href="classsock_1_1net_1_1_socket.html">sock::net::Socket</a></div><div class="ttdoc">套接字 </div><div class="ttdef"><b>Definition:</b> socket.h:38</div></div>
<div class="ttc" id="socket_8h_html"><div class="ttname"><a href="socket_8h.html">socket.h</a></div></div>
<div class="ttc" id="classsock_1_1net_1_1_reactor_html_ad616dbb0d11d2d651b5fd244e0e6c609"><div class="ttname"><a href="classsock_1_1net_1_1_reactor.html#ad616dbb0d11d2d651b5fd244e0e6c609">sock::net::Reactor::~Reactor</a></div><div class="ttdeci">virtual ~Reactor(void)</div><div class="ttdef"><b>Definition:</b> reactor.h:42</div></div>
</div><!-- fragment --></div><!-- contents -->
<!-- start footer part -->
<hr class="footer"/><address class="footer"><small>
Generated by &#160;<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/>
</a> 1.8.10
</small></address>
</body>
</html>
